package com.fuluwa.domain.usercenter.model.competence;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

//Foreign language
@Entity
public class MaterialSubDefine extends AbstractDefine {
	@ManyToOne
	private MaterialDefine materialDefine;

	private MaterialSubDefine() {
	}

	public MaterialSubDefine(String name, float value, MaterialDefine materialDefine) {
		super(name, value);
		this.materialDefine = materialDefine;
	}

	public float compute() {
		return value * materialDefine.compute();
	}

	public MaterialDefine getMaterialDefine() {
		return materialDefine;
	}

}